package cc.rengu.redp.bizimpl.upmp.vo;

import cc.rengu.redp.bizimpl.upmp.bean.DevicePurchTypeOptions;
import cc.rengu.redp.bizimpl.upmp.bean.DeviceTypeOptions;
import com.baomidou.mybatisplus.annotation.TableField;
import com.wuwenze.poi.annotation.Excel;
import com.wuwenze.poi.annotation.ExcelField;
import com.wuwenze.poi.validator.EmailValidator;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Size;

@Data
@Excel("终端库存管理导入导出数据")
public class BDeviceInfoVO {

    private static final long serialVersionUID = 1L;

    @TableField("ID")
    private String id;

    @TableField("INST_ID")
    private String instId;

    @TableField("DEVICE_NO")
    private String deviceNo;

    @TableField("DEVICE_TYPE")
    @ExcelField(value = "设备类型", maxLength = 20, required = true, comment = "提示：必填", options = DeviceTypeOptions.class,
            readConverterExp = "1-终端机具=1,2-终端部件=2", writeConverterExp = "1=1-终端机具,2=2-终端部件")
    private String deviceType;

    @TableField("DEVICE_DESC")
    @ExcelField(value = "设备描述", maxLength = 128, required = true,
            comment = "提示：必填，长度不能超过128个字符")
    @Size(max = 128, message = "设备描述长度不能超过128个字符")
    private String deviceDesc;

    @TableField("LIBRARY_TYPE")
    private String libraryType;

    @TableField("LIBRARY_BATCH")
    @ExcelField(value = "入库批次号", maxLength = 64, required = true, regularExp = "[A-Za-z0-9]+",
            comment = "提示：必填，长度不能超过64个字符")
    @Size(max = 64, message = "入库批次号长度不能超过64个字符")
    private String libraryBatch;

    @TableField("MODEL_CODE")
    @ExcelField(value = "终端型号代码", maxLength = 32, required = true,
            comment = "提示：必填，长度不能超过32个字符")
    @Size(max = 32, message = "终端型号代码长度不能超过32个字符")
    private String modelCode;

    @TableField("BRAND_CODE")
    @ExcelField(value = "终端厂商代码", maxLength = 32, required = true,
            comment = "提示：必填，长度不能超过32个字符")
    @Size(max = 32, message = "终端厂商代码长度不能超过32个字符")
    private String brandCode;

    @TableField("SN")
    @ExcelField(value = "S/N号", maxLength = 64, required = true, regularExp = "[A-Za-z0-9]+",
            comment = "提示：必填，长度不能超过64个字符")
    @Size(max = 64, message = "S/N号长度不能超过64个字符")
    private String sn;

    @TableField("START_DATE")
    @ExcelField(value = "有效期开始日期(yyyyMMdd)", width = 200, maxLength = 8, required = true,
            comment = "提示：必填，长度不能超过8个字符")
    @Size(max = 8, message = "有效期开始日期长度不能超过8个字符")
    private String startDate;

    @TableField("END_DATE")
    @ExcelField(value = "有效期截止日期(yyyyMMdd)", width = 200, maxLength = 8, required = true,
            comment = "提示：必填，长度不能超过8个字符")
    @Size(max = 8, message = "有效期截止日期长度不能超过8个字符")
    private String endDate;

    @TableField("CONTACT_NAME")
    @ExcelField(value = "终端联系人", maxLength = 32,
            comment = "提示：长度不能超过32个字符")
    @Size(max = 32, message = "终端联系人长度不能超过32个字符")
    private String contactName;

    @TableField("CONTACT_PHONE")
    @ExcelField(value = "联系人电话", maxLength = 11, regularExp = "[0-9]+",
            regularExpMessage = "必须是数字", comment = "提示: 只能填写数字，并且长度不能超过11位")
    @Size(max = 11, message = "联系人电话长度不能超过11个字符")
    private String contactPhone;

    @TableField("CONTACT_EMAIL")
    @ExcelField(value = "联系人邮箱", maxLength = 32,
            comment = "提示：只能填写邮箱，长度不能超过32个字符", validator = EmailValidator.class)
    @Size(max = 32, message = "联系人邮箱长度不能超过32个字符")
    private String contactEmail;

    @TableField("CONTACT_ADDR")
    @ExcelField(value = "联系地址", maxLength = 128,
            comment = "提示：长度不能超过128个字符")
    @Size(max = 128, message = "联系地址长度不能超过128个字符")
    private String contactAddr;

    @TableField("MCHNT_NO")
    private String mchntNo;


    @TableField("TERM_NO")
    private String termNo;


    @TableField("DEVICE_PURCH_TYPE")
    @ExcelField(value = "设备类型", maxLength = 20, required = true, comment = "提示：必填", options = DevicePurchTypeOptions.class,
            readConverterExp = "00-自用=00, 01-租用=01, 02-第三方所有=02", writeConverterExp = "00=00-自用, 01=01-租用, 02=02-第三方所有")
    private String devicePurchType;

    @TableField("DEVICE_PRICE")
    @ExcelField(value = "设备单价", maxLength = 20, required = true, regularExp = "[A-Za-z0-9]+",
            regularExpMessage = "必须是数字或字母", comment = "提示：必填，长度不能超过20个字符")
    @Size(max = 20, message = "设备单价长度不能超过20个字符")
    private String devicePrice;

    @TableField("LEASE_START_DATE")
    @ExcelField(value = "租赁起始日期(yyyyMMdd)", width = 200, maxLength = 8, comment = "提示：长度不能超过8个字符")
    @Size(max = 8, message = "租赁起始日期长度不能超过8个字符")
    private String leaseStartDate;


    @TableField("LEASE_END_DATE")
    @ExcelField(value = "租赁截止日期(yyyyMMdd)", width = 200, maxLength = 8, comment = "提示：长度不能超过8个字符")
    @Size(max = 8, message = "租赁截止日期长度不能超过8个字符")
    private String leaseEndDate;

    @TableField("DEVICE_LEASE_PRICE")
    @ExcelField(value = "设备租赁单价(元/日)", width = 200, maxLength = 20, regularExp = "[A-Za-z0-9]+",
            regularExpMessage = "必须是数字或字母", comment = "提示：长度不能超过20个字符")
    @Size(max = 20, message = "设备租赁单价长度不能超过20个字符")
    private String deviceLeasePrice;

    @TableField("CASH_PLEDGE")
    @ExcelField(value = "押金(元)", maxLength = 20, regularExp = "[A-Za-z0-9]+",
            regularExpMessage = "必须是数字或字母", comment = "提示：长度不能超过20个字符")
    @Size(max = 20, message = "押金长度不能超过20个字符")
    private String cashPledge;

    @TableField("AUDIT_REFUSE_REASON")
    private String auditRefuseReason;

    @TableField("AUDIT_STATUS")
    private String auditStatus;


    @TableField("STATUS")
    private String status;


    @TableField("CRT_ORG_ID")
    private String crtOrgId;


    @TableField("OPR_ID")
    private String oprId;


    @TableField("CREATE_TIME")
    private String createTime;

    @TableField("LAST_OPR_ID")
    private String lastOprId;

    @TableField("LAST_UPDATE_TIME")
    private String lastUpdateTime;

    @TableField("LAST_AUDIT_ID")
    private String lastAuditId;

    @TableField("LAST_AUDIT_TIME")
    private String lastAuditTime;

    @TableField("RESERVE1")
    private String reserve1;

    @TableField("RESERVE2")
    private String reserve2;

    @TableField("RESERVE3")
    private String reserve3;

    @TableField("RESERVE4")
    private String reserve4;


    @TableField("RESERVE5")
    private String reserve5;

    @TableField("RESERVE6")
    private String reserve6;

    @TableField("RESERVE7")
    private String reserve7;

    @TableField("RESERVE8")
    private String reserve8;

    private String brandName;
    private String modelName;
    private String optFlag;
    private String opt;
    private String ids;


}
